package sudroid;

import java.util.Collection;
import java.util.Map;

public class AssertUtil
{
  public static void check(boolean paramBoolean)
  {
    if ((!paramBoolean) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("isTrue must be TRUE!");
  }

  public static void checkArrayNullOrEmpty(byte[] paramArrayOfByte)
  {
    if ((paramArrayOfByte == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramArrayOfByte.length == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkArrayNullOrEmpty(char[] paramArrayOfChar)
  {
    if ((paramArrayOfChar == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramArrayOfChar.length == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkArrayNullOrEmpty(double[] paramArrayOfDouble)
  {
    if ((paramArrayOfDouble == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramArrayOfDouble.length == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkArrayNullOrEmpty(float[] paramArrayOfFloat)
  {
    if ((paramArrayOfFloat == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramArrayOfFloat.length == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkArrayNullOrEmpty(int[] paramArrayOfInt)
  {
    if ((paramArrayOfInt == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramArrayOfInt.length == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkArrayNullOrEmpty(long[] paramArrayOfLong)
  {
    if ((paramArrayOfLong == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramArrayOfLong.length == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkArrayNullOrEmpty(Object[] paramArrayOfObject)
  {
    if ((paramArrayOfObject == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramArrayOfObject.length == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkArrayNullOrEmpty(short[] paramArrayOfShort)
  {
    if ((paramArrayOfShort == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramArrayOfShort.length == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkCollectionNullOrEmpty(Collection<?> paramCollection)
  {
    if ((paramCollection == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramCollection.size() == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkMapNullOrEmpty(Map<?, ?> paramMap)
  {
    if ((paramMap == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
    if ((paramMap.size() == 0) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("array must have some datas");
  }

  public static void checkNull(Object paramObject)
  {
    if ((paramObject == null) && (LogUtils.isDebug()))
      throw new NullPointerException();
  }

  public static void checkRange(Collection<?> paramCollection, int paramInt)
  {
    checkCollectionNullOrEmpty(paramCollection);
    if (paramInt >= 0)
    {
      int i = paramCollection.size();
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(Map<?, ?> paramMap, int paramInt)
  {
    checkMapNullOrEmpty(paramMap);
    if (paramInt >= 0)
    {
      int i = paramMap.size();
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(byte[] paramArrayOfByte, int paramInt)
  {
    checkArrayNullOrEmpty(paramArrayOfByte);
    if (paramInt >= 0)
    {
      int i = paramArrayOfByte.length;
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(char[] paramArrayOfChar, int paramInt)
  {
    checkArrayNullOrEmpty(paramArrayOfChar);
    if (paramInt >= 0)
    {
      int i = paramArrayOfChar.length;
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(double[] paramArrayOfDouble, int paramInt)
  {
    checkArrayNullOrEmpty(paramArrayOfDouble);
    if (paramInt >= 0)
    {
      int i = paramArrayOfDouble.length;
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(float[] paramArrayOfFloat, int paramInt)
  {
    checkArrayNullOrEmpty(paramArrayOfFloat);
    if (paramInt >= 0)
    {
      int i = paramArrayOfFloat.length;
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(int[] paramArrayOfInt, int paramInt)
  {
    checkArrayNullOrEmpty(paramArrayOfInt);
    if (paramInt >= 0)
    {
      int i = paramArrayOfInt.length;
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(long[] paramArrayOfLong, int paramInt)
  {
    checkArrayNullOrEmpty(paramArrayOfLong);
    if (paramInt >= 0)
    {
      int i = paramArrayOfLong.length;
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(Object[] paramArrayOfObject, int paramInt)
  {
    checkArrayNullOrEmpty(paramArrayOfObject);
    if (paramInt >= 0)
    {
      int i = paramArrayOfObject.length;
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkRange(short[] paramArrayOfShort, int paramInt)
  {
    checkArrayNullOrEmpty(paramArrayOfShort);
    if (paramInt >= 0)
    {
      int i = paramArrayOfShort.length;
      if (paramInt < i);
    }
    else
    {
      String str = "You can't get the element of position:" + paramInt + "!";
      throw new IndexOutOfBoundsException(str);
    }
  }

  public static void checkStringNullOrEmpty(CharSequence paramCharSequence)
  {
    if ((TextUtils.isEmpty(paramCharSequence)) && (LogUtils.isDebug()))
      throw new IllegalArgumentException("str must have some datas");
  }

  public static Throwable getRootCause(Throwable paramThrowable)
  {
    Object localObject;
    if (paramThrowable == null)
      localObject = null;
    while (true)
    {
      return localObject;
      Throwable localThrowable1 = paramThrowable.getCause();
      Throwable localThrowable2 = localThrowable1;
      while (true)
      {
        if (localThrowable1 == null)
        {
          if (localThrowable2 != null)
            break label38;
          localObject = paramThrowable;
          break;
        }
        localThrowable2 = localThrowable1;
        localThrowable1 = localThrowable1.getCause();
      }
      label38: localObject = localThrowable2;
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     sudroid.AssertUtil
 * JD-Core Version:    0.6.0
 */